#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
class Compare
{
public:
    bool operator()(vector<int>& x, vector<int>& y)
    {
        return x.front() < y.front();
    }
};
class Solution
{
    bool hostschedule(vector<vector<int>>& nums)
    {
        sort(nums.begin(), nums.end(), Compare());
        for (int i = 1; i < nums.size(); i++)
        {
            if (nums[i - 1][1] > nums[i][0])
                return false;
        }
        return true;
    }
};
